home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Apple Shared Library Manager / ASLM Examples / Inspector / Sources / InspectorMain.PPC.r < prev    next >
Encoding:
Text File  |  1996-11-19  |  4.9 KB  |  259 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        InspectorMain.PPC.r
  3.  
  4.     Contains:    Resources for Inspector
  5.  
  6.     Copyright:    © 1991-1993 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10.  
  11. #include "SysTypes.r"
  12. #include "Types.r"
  13.  
  14. #include "VersionResource.r"
  15.  
  16. #include "SimpleCommon.h"
  17. #include "CodeFragmentTypes.r"
  18.  
  19.  
  20. resource 'cfrg' (0) {
  21.    {
  22.       kPowerPC,
  23.       kFullLib,
  24.       kNoVersionNum,kNoVersionNum,
  25.       0, 0,
  26.       kIsApp,kOnDiskFlat,kZeroOffset,kWholeFork,
  27.       "Inspector"
  28.    }
  29. };
  30.  
  31.  
  32. #define kPrefSize                512
  33. #define kMinSize                256
  34.  
  35. /* here is the quintessential MultiFinder friendliness device, the SIZE resource */
  36.  
  37. resource 'SIZE' (-1) {
  38.     dontSaveScreen,
  39.     acceptSuspendResumeEvents,
  40.     enableOptionSwitch,
  41.     canBackground,
  42.     multiFinderAware,    /* this says we do our own activate/deactivate; don't fake us out */
  43.     backgroundAndForeground, /* this is definitely note a background-only application! */
  44.     dontGetFrontClicks,    /* change this is if you want "do first click" behavior like the Finder */
  45.     ignoreChildDiedEvents,
  46.     is32BitCompatible,
  47.     reserved, reserved, reserved, reserved,
  48.     reserved, reserved, reserved,
  49.     kPrefSize * 1024,
  50.     kMinSize * 1024
  51. };
  52.  
  53.  
  54. type 'MOOT' as 'STR ';
  55.  
  56.  
  57. resource 'MOOT' (0) {
  58.     "ASLM Test Application"
  59. };
  60.  
  61.  
  62. resource 'BNDL' (128) {
  63.     'MOOT',
  64.     0,
  65.     {
  66.         'ICN#',
  67.         {
  68.             0, 128
  69.         },
  70.         'FREF',
  71.         {
  72.             0, 128
  73.         }
  74.     }
  75. };
  76.  
  77.  
  78. resource 'FREF' (128) {
  79.     'APPL',
  80.     0,
  81.     ""
  82. };
  83.  
  84.  
  85. resource 'ICN#' (128) {
  86.     { /* array: 2 elements */
  87.         /* [1] */
  88.         $"04 30 40 00 0A 50 A0 00 0B 91 10 02 08 22 08 03"
  89.         $"12 24 04 05 20 28 02 09 40 10 01 11 80 0C 00 A1"
  90.         $"80 03 FF C2 7E 00 FF 04 01 00 7F 04 03 00 1E 08"
  91.         $"04 E0 00 0C 08 E0 00 0A 10 E0 00 09 08 C0 00 06"
  92.         $"04 87 FE 04 02 88 01 04 01 88 00 84 00 88 00 44"
  93.         $"00 88 00 44 00 88 00 C4 01 10 01 88 02 28 03 10"
  94.         $"01 C4 04 E0 00 02 08 00 73 BF FB EE 4C A2 8A 2A"
  95.         $"40 AA AA EA 52 AA AA 24 5E A2 8A EA 73 BE FB 8E",
  96.         /* [2] */
  97.         $"04 30 40 00 0E 70 E0 00 0F F1 F0 02 0F E3 F8 03"
  98.         $"1F E7 FC 07 3F EF FE 0F 7F FF FF 1F FF FF FF BF"
  99.         $"FF FF FF FE 7F FF FF FC 01 FF FF FC 03 FF FF F8"
  100.         $"07 FF FF FC 0F FF FF FE 1F FF FF FF 0F FF FF FE"
  101.         $"07 FF FF FC 03 FF FF FC 01 FF FF FC 00 FF FF FC"
  102.         $"00 FF FF FC 00 FF FF FC 01 FF FF F8 03 EF FF F0"
  103.         $"01 C7 FC E0 00 03 F8 00 73 BF FB EE 7F BE FB EE"
  104.         $"7F BE FB EE 7F BE FB E4 7F BE FB EE 73 BE FB 8E"
  105.     }
  106. };
  107.  
  108.  
  109. resource 'STR#' (kInspectorMainErrStrings, purgeable) {
  110.     {
  111.     "Could not load the InspectorLibrary. Inspector functionality will be minimal";
  112.     "InitLibraryManager failed. Inspector functionality will be minimal"
  113.     }
  114. };
  115.  
  116. /* Resources for the SimpleProgram NV routine */
  117.  
  118. /* we use an MBAR resource to conveniently load all the menus */
  119.  
  120. resource 'MBAR' (rMenuBar) {
  121.     { mApple, mFile, mEdit};
  122. };
  123.  
  124. resource 'MENU' (mApple) {
  125.     mApple, textMenuProc,
  126.     0b1111111111111111111111111111101,    /* disable dashed line, enable About and DAs */
  127.     enabled, apple,
  128.     {
  129.         "About Inspector…",
  130.             noicon, nokey, nomark, plain;
  131.         "-",
  132.             noicon, nokey, nomark, plain
  133.     }
  134. };
  135.  
  136. resource 'MENU' (mFile) {
  137.     mFile, textMenuProc,
  138.     0b0000000000000000000000000001000,    /* enable Quit only, program enables others */
  139.     enabled, "File",
  140.     {
  141.         "Load ASLM",
  142.             noicon, "L", nomark, plain;
  143.         "Unload ASLM",
  144.             noicon, "U", nomark, plain;
  145.         "Goto Real Program",
  146.             noicon, "G", nomark, plain;
  147.         "Quit",
  148.             noicon, "Q", nomark, plain
  149.     }
  150. };
  151.  
  152.  
  153. resource 'MENU' (mEdit) {
  154.     mEdit, textMenuProc,
  155.     0b0000000000000000000000000000000,    /* disable everything, program does the enabling */
  156.     enabled, "Edit",
  157.      {
  158.         "Undo",
  159.             noicon, "Z", nomark, plain;
  160.         "-",
  161.             noicon, nokey, nomark, plain;
  162.         "Cut",
  163.             noicon, "X", nomark, plain;
  164.         "Copy",
  165.             noicon, "C", nomark, plain;
  166.         "Paste",
  167.             noicon, "V", nomark, plain;
  168.         "Clear",
  169.             noicon, nokey, nomark, plain
  170.     }
  171. };
  172.  
  173.  
  174. /* this ALRT and DITL are used as an error screen */
  175. resource 'ALRT' (rUserAlert, purgeable) {
  176.     {40, 20, 180, 330},
  177.     rUserAlert,
  178.     { /* array: 4 elements */
  179.         /* [1] */
  180.         OK, visible, silent,
  181.         /* [2] */
  182.         OK, visible, silent,
  183.         /* [3] */
  184.         OK, visible, silent,
  185.         /* [4] */
  186.         OK, visible, silent
  187.     }
  188. };
  189.  
  190. resource 'DITL' (rUserAlert, purgeable) {
  191.     { /* array DITLarray: 3 elements */
  192.         /* [1] */
  193.         {110, 220, 130, 300},
  194.         Button {
  195.             enabled,
  196.             "OK"
  197.         },
  198.         /* [2] */
  199.         {10, 60, 90, 300},
  200.         StaticText {
  201.             disabled,
  202.             "Error. ^0."
  203.         },
  204.         /* [3] */
  205.         {8, 8, 40, 40},
  206.         Icon {
  207.             disabled,
  208.             2
  209.         }
  210.     }
  211. };
  212.  
  213.  
  214. /* this ALRT and DITL are used as an About screen */
  215.  
  216. resource 'ALRT' (rAboutAlert, purgeable) {
  217.     {40, 20, 160, 330 }, rAboutAlert, {
  218.         OK, visible, silent;
  219.         OK, visible, silent;
  220.         OK, visible, silent;
  221.         OK, visible, silent
  222.     };
  223. };
  224.  
  225. resource 'DITL' (rAboutAlert, purgeable) {
  226.     { /* array DITLarray: 5 elements */
  227.         /* [1] */
  228.         {88, 224, 108, 304},
  229.         Button {
  230.             enabled,
  231.             "OK"
  232.         },
  233.         /* [2] */
  234.         {8, 8, 24, 304 },
  235.         StaticText {
  236.             disabled,
  237.             "ASLM Inspector Application"
  238.         },
  239.         /* [3] */
  240.         {32, 8, 48, 237},
  241.         StaticText {
  242.             disabled,
  243.             "Copyright © 1991-1993 Apple Computer"
  244.         },
  245.         /* [4] */
  246.         {56, 8, 72, 136},
  247.         StaticText {
  248.             disabled,
  249.             "Brought to you by:"
  250.         },
  251.         /* [5] */
  252.         {80, 24, 112, 220},
  253.         StaticText {
  254.             disabled,
  255.             "The ASLM Team"
  256.         }
  257.     }
  258. };
  259.